Optimal. Leaf size=76 \[ \frac{b (2 a+3 b) \tan (e+f x)}{f}-\frac{(a+b)^2 \cot ^3(e+f x)}{3 f}-\frac{(a+b) (a+3 b) \cot (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0756403, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {4132, 448} \[ \frac{b (2 a+3 b) \tan (e+f x)}{f}-\frac{(a+b)^2 \cot ^3(e+f x)}{3 f}-\frac{(a+b) (a+3 b) \cot (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4132
Rule 448
Rubi steps
\begin{align*} \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+x^2\right ) \left (a+b+b x^2\right )^2}{x^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (b (2 a+3 b)+\frac{(a+b)^2}{x^4}+\frac{(a+b) (a+3 b)}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{(a+b) (a+3 b) \cot (e+f x)}{f}-\frac{(a+b)^2 \cot ^3(e+f x)}{3 f}+\frac{b (2 a+3 b) \tan (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f}\\ \end{align*}
Mathematica [A] time = 1.30718, size = 151, normalized size = 1.99 \[ -\frac{\csc (2 e) \csc ^3(2 (e+f x)) \left (-3 a^2 \sin (2 (e+f x))+a^2 \sin (6 (e+f x))+3 a^2 \sin (4 e+2 f x)+a^2 \sin (4 e+6 f x)-6 a b \sin (2 (e+f x))+2 a b \sin (6 (e+f x))+8 a b \sin (4 e+6 f x)+8 a (a+2 b) \sin (2 e)-6 (a+2 b)^2 \sin (2 f x)+8 b^2 \sin (4 e+6 f x)\right )}{6 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.061, size = 144, normalized size = 1.9 \begin{align*}{\frac{1}{f} \left ({a}^{2} \left ( -{\frac{2}{3}}-{\frac{ \left ( \csc \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) \cot \left ( fx+e \right ) +2\,ab \left ( -1/3\,{\frac{1}{ \left ( \sin \left ( fx+e \right ) \right ) ^{3}\cos \left ( fx+e \right ) }}+4/3\,{\frac{1}{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }}-8/3\,\cot \left ( fx+e \right ) \right ) +{b}^{2} \left ({\frac{1}{3\, \left ( \sin \left ( fx+e \right ) \right ) ^{3} \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}-{\frac{2}{3\, \left ( \sin \left ( fx+e \right ) \right ) ^{3}\cos \left ( fx+e \right ) }}+{\frac{8}{3\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }}-{\frac{16\,\cot \left ( fx+e \right ) }{3}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.987961, size = 108, normalized size = 1.42 \begin{align*} \frac{b^{2} \tan \left (f x + e\right )^{3} + 3 \,{\left (2 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right ) - \frac{3 \,{\left (a^{2} + 4 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}}{\tan \left (f x + e\right )^{3}}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.477801, size = 240, normalized size = 3.16 \begin{align*} -\frac{2 \,{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{6} - 3 \,{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 6 \,{\left (a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \,{\left (f \cos \left (f x + e\right )^{5} - f \cos \left (f x + e\right )^{3}\right )} \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2773, size = 142, normalized size = 1.87 \begin{align*} \frac{b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) + 9 \, b^{2} \tan \left (f x + e\right ) - \frac{3 \, a^{2} \tan \left (f x + e\right )^{2} + 12 \, a b \tan \left (f x + e\right )^{2} + 9 \, b^{2} \tan \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}}{\tan \left (f x + e\right )^{3}}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]